-- common..p_InsItem 0,'P','UIIO','VT','AB','III','III', 90.0,67.0,7.0,120,78.0,89.0,0.0,null,1348.0,'Test'
-----------------------------------------------------------------------------
-- DDL for Table'common.dbo.t_SalesOrder'
-----------------------------------------------------------------------------
print 'Creating Table common.dbo.t_SalesOrder'
go 

use common
go 

setuser 'dbo'
go 
drop table t_SalesOrder
go
create table t_SalesOrder (
	ItemCode               	varchar(50)						NULL,	   	-- TK123,PLAVE456 etc UIIO
	ItemName              	varchar(30)						NULL,	   	-- TEAK,PALLAVE,ETC   VT
	ItemClass      			varchar(10)						NULL,	   	-- class A,B etc AB
	InvoiceNumber           varchar(50)						NULL,	   	-- InvoiceNumber
	SalesPrice      		decimal(10,4)					NULL,		--	SalesPrice 89
	ShipTo              	varchar(30)						NULL,	   	-- ShipTo
	LotNumber      			varchar(30)						NULL,	   	--  belong to which lot number III
	Length           		decimal(10,4)					NULL,	   	--  Length 90
	Width          			decimal(10,4)					NULL,		--	Width 67
	Units	      			decimal(10,4)					NULL,		--	Units 89
	UnitPrice      			decimal(10,4)					NULL,		--	UnitPrice 89
	ExtendedPrice      		decimal(10,4)					NULL,		--	ExtendedPrice 78
	Profit          		decimal(10,4)					NULL,		--	ExtendedPrice
	Measurement          	varchar(10)						NULL,		--	Profit
	Quantity          		decimal(10,4)					NULL,		--  Quantity 120
	Tax            			decimal(10,4)					NULL,		--	Tax
	Total            		decimal(10,4)					NULL,		--	Total
	Amount					decimal(10,4)					NULL,		--	Amount
	Supplier      			varchar(30)						NULL,	   	--  belong to which Supplier
	SalesDate	    		datetime						NULL,		--	SalesDate
	RequestedDate	    	datetime						NULL,		--	RequestedDate
	TransactionDate	    	datetime						NULL,		--	TransactionDate
	CompanyName				varchar(30)						NULL	   	--  belong to which Company
)
go
Grant Select on dbo.t_SalesOrder to public 
go
setuser
go